<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    html,body{
      padding: 0;
    }
    .container{
      position: fixed;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      background-color: #2196f3;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .form{
      height: 400px;
      width: 450px;
      background-color: #5c616f;
      line-height: 400px;
      text-align: center;
    }
  </style>
</head>
<body>
  <!-- 要就实现大盒子铺满全屏,内部盒子完美居中 -->
  <!-- 思路就是外层直接固定定位然后使用flex布局，内部就会自动定位到中间 -->
  <div class="container">
    <div class="form">登录</div>
  </div>
</body>
</html>